package csdn.object;

public class Test6 {
    public static void main(String[] args) {
        A a = new A();
        a.exchange(a.str,a.ch);
        System.out.print(a.str+" and ");
        System.out.println(a.ch);
    }
}

class A{
    String str="hello";
    final char[] ch={'j','a','v','a'};
    public void exchange(String str,char[]ch){
        str="abc";
        ch[0]='z';
    }
}